package com.hzjob.dao;

import java.util.List;

import org.hibernate.Query;
import org.hibernate.Session;

import com.hzjob.domain.TJob;
import com.hzjob.util.MySessionFactory;

public class JobDAOImpl implements JobDAO {

	@Override
	public List<TJob> findAll() {
		Session session =  MySessionFactory.currentSession(1);
		Query query = session.createQuery("from TJob");
		List<TJob> jobs = query.list();
		return jobs;
	}

}
